<template>
<div>
  <!--面包屑导航区域-->
      <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/cooker' }" style="font-size:18px">首页</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/cook_order'}" style="font-size:18px">派单查看</el-breadcrumb-item>
      </el-breadcrumb>



  <!--卡片视图区-->

      <!--表单区域-->
      <el-table :data="items" height="500" border>
        <el-table-column prop="name" label="菜名" width="600" align="center"> 
        </el-table-column>
        <el-table-column prop="num" label="数量" width="600" align="center">
        </el-table-column>
        <el-table-column type="selection" width="200" :selectable="selectable" align="center">
        </el-table-column>
      </el-table>

      <!-- 确认按钮 -->
      <el-card style="text-align:center">
        <el-row>
        <el-button type="primary" @click="Submit">派单确认</el-button>
      </el-row> 
      </el-card>      
</div>
</template>


<script>
import {requestData} from "../../ajax";
export default {
 data:function() {
      return{
      items : [],
      }
           
    },
    mounted:function(){
        // 准备条件
        var request_data = new FormData();
        // 请求数据
        requestData("get","cooker_order.json", request_data).then((resp)=>{
            // 赋值数据到linesdata
            var result = resp.data;
            this.items = result["order"];
        });
    },
    methods:{
    Submit(){
       this.$alert('确认完成！即将返回主界面').then(()=>{this.$router.push({path:"/cooker"})});
    }
  }

};
</script>
<style scoped>
.el-breadcrumb{
    margin-bottom: 15px;
    font-size: 15px;
}
  .demo-table-expand {
    font-size: 0;
  }
  .demo-table-expand label {
    width: 90px;
    color: #99a9bf;
  }
  .demo-table-expand .el-form-item {
    margin-right: 0;
    margin-bottom: 0;
    width: 50%;
  }
</style>
